package com.aiden.cashbook.bill.dagger

import com.aiden.cashbook.bill.BillPresenter
import com.aiden.cashbook.data.charge.ChargeLocalDataSource
import com.aiden.cashbook.data.charge.ChargeRemoteDataSource
import com.aiden.cashbook.data.charge.ChargeRepository
import dagger.Module
import dagger.Provides
import javax.inject.Named

@Module
class BillListPresenterModule {

    @Named("billRepository")
    @Provides
    fun provideBillRepository(): ChargeRepository {
        return ChargeRepository(ChargeLocalDataSource(), ChargeRemoteDataSource())
    }

    @Provides
    fun providePresenter(@Named("billRepository") billRepository: ChargeRepository): BillPresenter {
        return BillPresenter(billRepository)
    }
}